﻿<local:CriteriaControlBase 
    x:Class="Rio.Framework.Pages.CriteriaControls.DateIndexSearchControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Rio.Framework.Pages.CriteriaControls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerikCalendar="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
    mc:Ignorable="d"
     d:DesignHeight="60" d:DesignWidth="300">

    <local:CriteriaControlBase.Resources>
        <Style x:Key="RadDatePickerStyle" TargetType="telerikInput:RadMaskedTextBox">
            <Setter Property="Width" Value="200"/>
            <Setter Property="Margin" Value="5,0,0,0"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
    </local:CriteriaControlBase.Resources>

    <StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBlock Name="LabelControl" Style="{StaticResource LabelIndexStyle}" />
            <TextBlock Name="LabelMandatory" Text="*" Margin="5,0,5,0" Foreground="Red" Visibility="Collapsed"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal">

            <telerikInput:RadMaskedTextBox Name="DateInput" LostFocus="DateInput_LostFocus" Background="White" Height="25" Margin="5,3,0,0"
                    Mask="##/##/####"  VerticalAlignment="Center" Style="{StaticResource RadDatePickerStyle}" Width="205" />

            <telerik:RadDropDownButton Padding="5" Name="CalendarDropDownBtn" Width="25" Height="25" Content="" Margin="0,3,5,0">
                <telerik:RadDropDownButton.DropDownContent>
                    <telerikCalendar:RadCalendar x:Name="calendar"
                        VerticalAlignment="Top" Margin="0,15,0,0" HorizontalAlignment="Center"
                        SelectionMode="Single" 
                        IsTodayHighlighted="True" ViewsHeaderVisibility="Collapsed"
                        Culture="fr-FR" DayTemplate="{x:Null}"
                        SelectionChanged="calendar_SelectionChanged">
                    </telerikCalendar:RadCalendar>
                </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>


            <telerik:RadButton Name="FilterButton" Visibility="Collapsed" Click="buttonInput_Click" Width="25" Height="25">
                <Image Width="16" Height="16" Source="../../Assets/Images/Filter.png" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </telerik:RadButton>
            <telerik:RadButton Name="DeleteButton" Visibility="Collapsed" Click="buttonDelete_Click" Width="25" Height="25">
                <Image Width="16" Height="16" Source="../../Assets/Images/RemoveControlSearch.png" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </telerik:RadButton>
        </StackPanel>
    </StackPanel>
</local:CriteriaControlBase>
